package top.chukongxiang.monitorservice.tools.rtp;

import lombok.Getter;

/**
 * @author 楚孔响
 * @version 1.0
 * @date 2023/9/13 19:46
 */
public abstract class StreamWrapper {

    @Getter
    private final byte[] data;

    private static final byte[] START_CODE = new byte[]{0x00,0x00,0x01,(byte)0xBA};

    protected StreamWrapper(byte[] data) {
        this.data = data;

    }

    protected StreamWrapper(Byte[] data) {
        if (data == null) {
            this.data = new byte[0];
        } else {
            this.data = new byte[data.length];
            for (int i = 0; i < data.length; i++) {
                this.data[i] = data[i];
            }
        }
    }


}
